home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / tdhide.zip / TDHIDE.DOC < prev    next >
Text File  |  1992-02-01  |  6KB  |  124 lines

  1. TDHIDE 1.0 - Shrinks TLink debug information
  2.   Copyright (c) 1992, D.J. Murdoch
  3.  
  4. Syntax:
  5.          TDHIDE filename modulename [modulename ...]
  6.            to delete references to named modules, or
  7.          TDHIDE filename
  8.            to report on all modules, but make no changes
  9.  
  10.    An extension of .EXE is assumed on the input file.  To modify
  11.   .TDS files, give the extension explicitly.
  12.  
  13. Examples:
  14.  
  15.   TDHIDE myprog system
  16.     will hide all the system unit constants and variables.  Some of the
  17.     standard System unit types appear to be built in to TD, so you'll
  18.     still have access to those, but the displays will look funny.
  19.  
  20.   TDHIDE myprog
  21.     will produce a report listing the modules, the number of symbols
  22.     defined in each, and the amount of space that TDHIDE could recover
  23.     by hiding each of them.
  24.  
  25. Description:
  26.  
  27.   Borland's Turbo Pascal has two debugging modes:  debugging within the
  28.   IDE, and external debugging using the Turbo Debugger.  To do allow
  29.   external debugging, it writes debugging information at the end of the
  30.   .EXE file.  This is the same format as is produced by the TLINK
  31.   linker.
  32.  
  33.   There's one problem with the way TP writes the debug information for
  34.   units.  All interfaced constants and type definitions are written out,
  35.   whether debugging information is on or off for that unit.  This means
  36.   that the symbol table can become quite large; since TD loads it into
  37.   memory when you're debugging, you can run out of memory when debugging
  38.   large programs which use lots of units.  It also means that TD can be
  39.   unnecessarily slow; when a watch variable goes out of scope, TD
  40.   searches the whole table of identifiers before it gives up and
  41.   displays "????", and it does this *every* time you change the
  42.   instruction pointer by executing something.
  43.  
  44.   TDHIDE is an effort to fix both of these problems.  If you know that
  45.   you'll never need to access the identifiers in a particular module
  46.   (unit), you can run TDHIDE to hide the module.  It will delete all
  47.   symbols from the TLINK symbol table for that module, and will reclaim
  48.   the space those names occupied.
  49.  
  50.   If you're not sure which module to hide, you can run TDHIDE with the
  51.   second syntax:
  52.  
  53.      TDHIDE exename
  54.  
  55.   This will analyze the symbol table for the given program, and report
  56.   on the number of symbols in each module, and the number of bytes which
  57.   could be recovered.
  58.  
  59.   TDHIDE also works with separate .TDS files, such as those produced by
  60.   "TDSTRIP -s exename".  You just specify the .TDS extension when you
  61.   give the file name, and the rest is automatic.
  62.  
  63. Limitations and Warnings:
  64.  
  65.   TDHIDE was written without any documentation on the TLINK debug
  66.   information.  It has been tested on versions 2.08 and 2.09 of the
  67.   debug info (which TP versions 5.5 and 6.0, and TLINK version 3.01
  68.   produce), but may miss some special cases.  Other versions of the
  69.   information probably won't work at all, but I haven't tested them.
  70.   I do know that BC++ uses version 3.x of the debug information, but
  71.   haven't had a chance to experiment enough to know if TDHIDE will work
  72.   there or not.
  73.  
  74.   The changes TDHIDE makes are irreversible.  If something goes wrong,
  75.   and you want to undo what TDHIDE did, the only way is to recompile or
  76.   relink your program.
  77.  
  78.   Use of TDHIDE will change the behaviour of TD in certain situations.
  79.   If one unit overrides a definition in one of TP's standard units, and
  80.   TDHIDE is used to hide the override, then TD will use the original
  81.   definition, and even if it doesn't get confused, you probably will.
  82.  
  83.   TDHIDE could do a much better job of reducing the size of the debug
  84.   information, but it takes a pretty conservative approach.  The TLINK
  85.   symbol table is a mess of pointers.  If I deleted anything from it,
  86.   I'd have to update hundreds or thousands of pointers; I just don't
  87.   think it would be practical to do that without documentation.
  88.   Instead, TDHIDE recovers space by shrinking the variable length
  89.   records containing symbol names.  Effectively, every name is replaced
  90.   by the zero-length name ''.
  91.  
  92. License:
  93.  
  94.   TDHIDE is *not* public domain.  It is copyrighted software, and I
  95.   (D.J. Murdoch) own the copyright.  It is, however, "freeware".  I
  96.   grant you a limited license to use this program for personal,
  97.   non-commercial use at no charge.  Commercial, governmental and
  98.   institutional users may evaluate it for a period of 30 days, but
  99.   *must* pay a site license fee of $50 to me if they continue to use it
  100.   beyond that time.  Educational exemptions are available; send me the
  101.   details of your proposed use to apply for one.
  102.  
  103.   Source code to TDHIDE is available to users who pay the license fee of
  104.   $50.  This is Turbo Pascal 6.0 code, and includes generic units for
  105.   analyzing .EXE files and TLINK debug information, and units for
  106.   managing huge (>64K) objects on the heap, and for extending the heap
  107.   into EMS memory.  It requires Object Professional from TurboPower
  108.   Software to recompile.
  109.  
  110.   Send license fees to me at the following address:
  111.  
  112.     D.J. Murdoch
  113.     79 John St. W.
  114.     Waterloo, Ontario, Canada
  115.     N2L 1B7
  116.  
  117.   Fees may be submitted in Canadian or U.S. dollars.
  118.  
  119. Warranty:
  120.  
  121.   TDHIDE comes with no warranty of any kind.  I don't what problems my
  122.   messing about with the TD debug information will cause; I strongly
  123.   recommend that you don't use TDHIDE unless you really need to.
  124.